package com.liuqi.openai.model.completion;

import com.liuqi.openai.model.OpenAiModelException;
import com.liuqi.openai.model.handler.StreamingResponseHandler;
import com.liuqi.openai.model.output.Response;

/**
 * 文本生成模型 opanai api请求路径: /completions
 * <p>
 *     流式响应
 * </p>
 *
 * @author liuqi
 * @date 2025/7/19
 * @see com.liuqi.openai.model.OpenAiCompletionModel
 **/
public interface StreamingCompletionModel {

    Response<String> generate(String prompt, StreamingResponseHandler handler) throws OpenAiModelException;

}
